package com.elisoft.emlap.agentmember;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.cloud.client.loadbalancer.LoadBalanced;
import org.springframework.cloud.netflix.eureka.EnableEurekaClient;
import org.springframework.context.annotation.Bean;
import org.springframework.web.client.RestTemplate;

/**
 * @Author wuyanshen
 * @Date 2018-12-11 2:28 PM
 * @Discription 描述
 */

@SpringBootApplication
//@EnableEurekaClient
@EnableDiscoveryClient
public class EmlapAgentMemberApplication {
    public static void main(String[] args) {
        SpringApplication.run(EmlapAgentMemberApplication.class, args);
    }


    /**
     * 向spring容器注入RestTemplate
     *
     * @Date 2018/12/12 11:04 AM
     * @Author wuyanshen
     */
    @Bean
    @LoadBalanced//启用客户端负载均衡Ribben
    public RestTemplate restTemplate() {
        return new RestTemplate();
    }
}
